<!DOCTYPE html>
<html lang="en" class="md device-pixel-ratio-3 device-retina device-desktop device-windows support-position-sticky">

<head>
    <meta charset="utf-8" />
    <meta name="viewport"
        content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1" />
    <link rel="apple-touch-icon" href="favicon.ico" />
    <meta name="apple-mobile-web-app-title" content="坏坏漫画" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="referrer" content="never">
    <script type="text/javascript" src="js/debug.js"></script>
    <link rel="shortcut icon" href="./favicon.ico" />
    <title>坏坏漫画</title>
    <link href="css/main.48b4036a.css" rel="stylesheet">
    <link href="css/aui.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/layer.js"></script>
    <script type="text/javascript" src="js/jquery.lazyload.min.js"></script>
    <script type="text/javascript" src="js/template-web.js"></script>
    <script type="text/javascript" src="js/aui-toast.js"></script>
    <script type="text/javascript" src="js/aui-dialog.js"></script>
    <script type="text/javascript" src="js/config.js" charset="utf-8"></script>
</head>

<body>
    <div id="root" style="height: 100%;">
        <div id="framework7-root" class="framework7-root ">
            <div class="panel-backdrop"></div>
            <div class="panel panel-right panel-reveal">
                <!-- 侧边栏 -->
                <div class="page" id="right-page">
                    <script>
                        $("#right-page").load("right-page.html");
                    </script>
                </div>
            </div>

            <div class="view view-main">

                <style>
                    #detail {
                        margin: unset;
                    }

                    #detail .item-inner {
                        padding-left: unset;
                        padding-right: unset;
                    }
                </style>
                <div class="view view-main">
                    <div class="reader-book-cover page page-current" data-name="bookCover-1552399884423">
                        <div class="fab fab-right-bottom" onclick="fab();"><a><i
                                    class="icon material-icons">more_horiz</i></a>
                        </div>
                        <div class="navbar">
                            <div class="navbar-inner sliding">
                                <div class="left"><a class="icon-only link icon-only back"
                                        href="javascript:history.go(-1);"><i class="icon icon-back"></i></a></div>
                                <div class="title">健身教練</div>
                                <div class="right"><a class="link icon-only panel-open" href="javascript:void(0)"
                                        onclick="pannelr()" data-panel="right"><i
                                            class="icon material-icons">dehaze</i></a></div>
                            </div>
                        </div>
                        <div class="page-content hide-navbar-on-scroll">
                            <div>
                                <div class="list no-hairlines">
                                    <ul>
                                        <li class="">
                                            <div class="item-content">
                                                <div class="item-inner">
                                                    <div class="book -margin-horizontal-sm book-cartoon">
                                                        <div class="cover">
                                                            <img src="images/swiper.jpg" alt="">
                                                            <span class="status" data-status="serialized">连载</span>
                                                        </div>
                                                        <div class="margin-horizontal-sm">
                                                            <p>
                                                            <h1 style="margin: 0;padding: 0;font-size: unset">
                                                                <span class="name" id="h1_span">健身教練</span></h1>

                                                            </p>
                                                            <div>
                                                                <p class="info">
                                                                    <small><label>作者: </label><a
                                                                            href="/home/index/search/k/"></a>
                                                                    </small>
                                                                </p>
                                                                <p class="info">
                                                                    <small><label>类型: </label></small>
                                                                </p>
                                                            </div>
                                                            <p class="info info-read-count">
                                                                <span class="score"><i
                                                                        class="icon material-icons">star</i>9.68</span>
                                                                <span class="readCount"><i
                                                                        class="icon material-icons">remove_red_eye</i>
                                                                    31074阅读</span>
                                                            </p>
                                                        </div>
                                                        <font size="5" color="#cc0000">
                                                            <MARQUEE scrollAmount=3 behavior=alternate>
                                                                本站禁止任何國家地區未成年人訪問,我們無法鑒別訪問者的年齡,請未成年訪問者立即退出本站</MARQUEE>
                                                        </font>

                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="">
                                            <div class="item-content">
                                                <div class="item-inner">
                                                    <div class="width-100 row">
                                                        <div class="col"><a id="addSubBtn"
                                                                onclick="addUserBook(this,54)" data-value="add"
                                                                class="button button-outline"
                                                                href="javascript:void(0)"></a></div>
                                                        <div class="col"><a class="button button-fill" id="continusRead"
                                                                onclick="javascript:jumpurl()"><span
                                                                    id="ksyd">开始阅读</span></a></div>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="">
                                            <div class="item-content">
                                                <div class="item-inner">
                                                    <article>
                                                        <p class="book-desc">
                                                            賢秀是業績萬年墊底的健身教練，而組長傑森憑著銷售能力和親密的肢體接觸長年獨佔業績第一名的寶座。當青梅竹馬來到健身房運動時，賢秀要怎麼阻止她遭受到傑森的毒手呢？
                                                        </p>
                                                    </article>
                                                </div>
                                            </div>
                                        </li>
                                        <li class=""><a class="item-link" href="/home/book/capter/id/58448">
                                                <div class="item-content">
                                                    <div class="item-inner">
                                                        <div><i
                                                                class="margin-right-sm icon material-icons color-gray">access_time</i>
                                                            最新
                                                        </div>
                                                        <div class="item-after">
                                                            <span class="margin-right-sm" id="latest-chapter">最终话
                                                                各自过着幸福的生活</span>
                                                            <!-- 58阅币 -->
                                                            2022-01-28 02:51:49
                                                        </div>
                                                    </div>
                                                </div>
                                            </a></li>
                                        <li class=""><a class="item-link" id="chapter_url" href="/chapter.html?id=">
                                                <div class="item-content">
                                                    <div class="item-inner">
                                                        <div><i
                                                                class="margin-right-sm icon material-icons color-gray">format_list_bulleted</i>
                                                            目录（小图快速看）
                                                        </div>
                                                        <div class="item-after" id="total-chapter"> 共107<span
                                                                chapter-unit="cartoon"></span></div>
                                                    </div>
                                                </div>
                                            </a></li>
                                    </ul>
                                </div>
                                <div class="col-100">
                                    <a href="/home/book/index/id/450"><img src="images/swiper.jpg" alt=""
                                            class="margin-bottom-md" style="width: 100%; margin: 0px; display: block;">
                                    </a>
                                </div>
                                <li class="normal-divider-line item-divider">
                                    <span></span>
                                </li>
                                </ul>
                            </div>
                            <div id="cnxh" class="reader-zone-list-view list no-hairlines">
                                <ul>
                                    <li class="">
                                        <div class="item-content">
                                            <div class="item-inner">
                                                <div class="item-title">猜你喜欢</div>
                                                <div class="item-after"></div>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                                <ul id="cnxh2">

                                </ul>
                            </div>
                        </div>
                    </div>
                    <div id="bookActions" class="reader-book-read-actions-modal actions-modal">
                        <div class="actions-group">
                            <div class="margin-vertical height-auto block">
                                <div class="reader-book reader-book-media">
                                    <div class="cover">
                                        <img alt="" id="cover" src="https://www.xxctty47.xyz/images/20210926/7434718d5ece-f2ea-46bd-9d36-f8bf8ee46fad.jpg">
                                        <span class="status" data-status="serialized">连载</span>
                                        <span class="type" data-type="cartoon"></span>
                                    </div>
                                    <span class="name" id="share-name">健身教練</span>
                                    <p class="desc" id="share-desc">
                                        賢秀是業績萬年墊底的健身教練，而組長傑森憑著銷售能力和親密的肢體接觸長年獨佔業績第一名的寶座。當青梅竹馬來到健身房運動時，賢秀要怎麼阻止她遭受到傑森的毒手呢？
                                    </p>
                                    <div class="footer"><span class="score"><i class="icon material-icons">star</i>
                                        </span><span class="readCount"><i class="icon material-icons">remove_red_eye</i>
                                            31074</span><span class="author">作者：</span></div>
                                </div>
                            </div>
                            <div class="width-100 no-margin list">
                                <ul>
                                    <li class="">
                                        <div class="item-content">
                                            <div class="item-inner">
                                                <div><i class="margin-right text-color-gray icon material-icons">flash_on</i>自动购买下一
                                                    <span chapter-unit="cartoon"></span>
                                                </div>
                                                <label class="toggle"><input type="checkbox" value="">
                                                    <span class="toggle-icon"></span>
                                                </label>
                                            </div>
                                        </div>
                                    </li>
                                    <li class="no-touch-callout"><a class="item-link" href="#">
                                            <div class="item-content">
                                                <div class="item-inner" onclick="share2()"><span><i
                                                            class="margin-right text-color-gray icon material-icons">share</i>
                                                        分享 </span><span class="item-after line-height-20">赚书币免费看
                                                        <span><i
                                                                class="line-height-20 font-size-20 vertical-align-top no-touch-callout icon material-icons">help</i></span></span>
                                                </div>
                                            </div>
                                        </a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <script type="text/html" id="booklist2">
                {{each data  value i}}
                <li class="reader-zone-list-view-books">
                    <div class="item-content">
                        <div class="item-inner">
                            <div class="display-flex justify-content-space-between width-100">
                                <a class="reader-book reader-book-default reader-book-round reader-book-media"
                                    href="/book.html?id={{value['id']}}">
                                    <div class="">
                                        <div class="cover">
                                            <img src="{{value['image']}}"/>
                                            {{if value['mhstatus']==0}}
                                            <span class="status" data-status="serialized">连载</span>
                                            {{/if}}
                                            {{if value['mhstatus']==1}}
                                            <span class="status" data-status="finish">完结</span>
                                            {{/if}}

                                            {{if value['tjswitch']==1}}
                                            <span class="type" data-type="recommend"></span>
                                            {{/if}}

                                            {{if value['isjingpin']==1}}
                                            <span class="type" data-type="competitive"></span>
                                            {{/if}}
                                            {{if value['xianmian']==1}}
                                            <span class="type" data-type="free_in_limit_time"></span>
                                            {{/if}}
                                        </div>
                                        <span class="name">{{value['title']}}</span>
                                        <p class="desc">{{value['desc']}}</p>
                                        <div class="footer">
                                            <span class="score"><i
                                                    class="icon material-icons">star</i> {{value['pingfen']}}</span>
                                            <span class="readCount"><i class="icon material-icons">remove_red_eye</i> {{value['view']}}</span>
                                            <span class="author">作者：{{value['auther']}}</span>

                                        </div>

                                    </div>
                                </a>
                            </div>
                        </div>
                    </div>
                </li>
                {{/each}}
            </script>


        </div>
        <div class="framework7-modals"></div>
        <div class="actions-backdrop"></div>
        <div class="dialog-backdrop"></div>
        <div class="dialog dialog-buttons-1 dialog-buttons-vertical reader-copy-modal modal-in"
            style="display: none; margin-top: -372px;">
            <div class="dialog-inner">
                <div class="dialog-title"></div>
                <div class="dialog-text"></div>
                <input id="foo" type="link" value="" readonly="">
            </div>
            <div class="dialog-buttons">
                <span class="dialog-button dialog-button-bold text-align-center text-color-primary"
                    data-clipboard-action="copy" data-clipboard-target="#foo">复制链接</span>
            </div>
        </div>
        <div class="popover-backdrop"></div>
        <div class="toast">
            <div class="toast-content">
                <div class="toast-icon"></div>
                <div class="toast-text"></div>
                <a class="toast-button"></a>
            </div>
        </div>

    </div>
    </div>
    <script type="text/javascript" src="js/yymh.js"></script>
    <script src="js/clipboard.min.js"></script>
    <script type="text/javascript" src="js/api.js"></script>
    <script type="text/javascript" src="js/aui-toast.js"></script>
    <script type="text/javascript">
        //初始化
        var bookdata = { 
            bookId: getQueryVariable("id"),
        }
        $(function () {
            var id = getQueryVariable("id");
            appCenter.doPost(baseApi + "/carton/api/book",{ id: id },function (data) {
                if (data.code === 0) {
                    $(".title").text(data.data.title);
                    $(".book-desc").text(data.data.desc);
                    $("#latest-chapter").text(data.data.latest);
                    $("#total-chapter").text(data.data.total + "话");
                    $("#share-desc").text(data.data.desc);
                    $("#share-name").text(data.data.title);
                    $("#h1_span").text(data.data.title);
                    bookdata.title=data.data.title;
                    $("#cover").attr("src",data.data.cover);
                    bookdata.image = data.data.cover;
                    $("#chapter_url").attr("href", "/chapter.html?id=" + getQueryVariable("id")+"&book="+ data.data.title);
                    $('#continusRead').attr("href", "/chapter.html?id=" + getQueryVariable("id")+"&book="+ data.data.title);
                }else{
                    window.location.href="/login.html";
                }
            })

            appCenter.doPost(baseApi + "/carton/api/yymhindex",{ limit: 5, type: 1, item: "cnxh" },function (data) {
                if (data.code === 0) {
                    var top = template('booklist2', data);
                    document.getElementById("cnxh2").innerHTML = top;
                }
            })

            isSubscribe();
        });
        
        function addUserBook(that, id) {
            let action =  $('#addSubBtn').attr('data-value');
            if (action == 'add') {
                appCenter.doHeaderPost(baseApi + "/carton/app/subscribe",bookdata,{'authToken':localStorage.getItem("authToken")},function (data) {
                    if (data.code != 0) {
                        return false;
                    }
                    if (data.code == 0) {
                        $('#addSubBtn').html("移除书架");
                        $('#addSubBtn').attr('data-value',"del");
                        toast.custom({
                            title: "加入书架",
                            html: '<i class="aui-iconfont aui-icon-laud"></i>',
                            duration: 2000
                        });
                    }
                })
            }else if (action == 'del') {
                appCenter.doHeaderPost(baseApi + "/carton/app/unsubscribe",bookdata,{'authToken':localStorage.getItem("authToken")},function (data) {
                    if (data.code != 0) {
                        return false;
                    }
                    if (data.code == 0) {
                        $('#addSubBtn').html("订阅追更");
                        $('#addSubBtn').attr('data-value',"add");
                        toast.custom({
                            title: "移除书架",
                            html: '<i class="aui-iconfont aui-icon-laud"></i>',
                            duration: 2000
                        });
                    } 
                })

            }
        }

        //是否已加入书架
        function isSubscribe() {
            appCenter.doHeaderPost(baseApi + "/carton/app/isSubscribe",bookdata,{'authToken':localStorage.getItem("authToken")},function (data) {
                    if (data.code == '0'&& data.data.length>0) {
                        $('#addSubBtn').html("移出书架");
                        $('#addSubBtn').attr('data-value',"del");
                        // $('#addSubBtn').toggleClass('aui-btn-warning');
                    } else {
                        $('#addSubBtn').html('订阅追更');
                        $('#addSubBtn').attr('data-value',"add");
                    }
            })
        }

        function share2() {
            $('.actions-backdrop').removeClass('backdrop-in');
            $("#bookActions").remove();
            shareLine();
        }

        function isRead() {
            $.ajax({
                type: "get",
                url: "/home/api/isread/id/54",
                data: null,
                async: true,
                success: function (resjson) {
                    if (resjson.code === 0) {
                        if (resjson.data.history === 1) {
                            $("#ksyd").html("继续阅读");
                            $("#continusRead").attr("date-url", '/home/book/capter/id/' + resjson.data.capter_id);
                            return
                        }
                    }
                    $("#ksyd").html("开始阅读");
                    $("#continusRead").attr("date-url", '/home/book/capter/id/' + resjson.data.capter_id);
                }
            })
        }

        function jumpurl() {
            window.location.href = $('#continusRead').attr('date-url');
        }
    </script>


</body>

</html>